function dl(obj)
{
	window.location.href="/sy.php";
	
}
$(document).ready(function(){
	$.ajax({
		type:"post",
		url:"tiaodl.php",
		data:{
			code:$("#div1>div:nth-child(3)").attr("code")
		},
		dataType:"json",
		success:function(msg){
			console.log(msg);
			if(msg!=null)
			{
				$("#div1>div:nth-child(3)").text("已登录");
			}
		}
	});
	
				$("#a11").slideUp(20);
				$("#div3_1").click(function(){
					$("#a11").slideToggle();
				});
				$(".a11_1").mouseenter(function(){
					$("#div5").css("display","block");
					$("#ifm1").attr("src",$(this).attr("ssrc"));
				});
				$(".a11_1").mouseleave(function(){//先鼠标移入才可以鼠标移出
					$("#div5").css("display","none");
				});
				
				
				
				//轮播图
				
				
				var a = 0;
				setIntCode = setInterval(function(){
					a++;
					if(a>3)
					{
						$(".div_tiao").animate({"left":0+"px"},0);
						a=1;
					}
					if(a==3)
					{
						$("[code='1']").addClass("an1");
						$("[code='1']").siblings().removeClass("an1");
					}
					console.log(a);
					$("[code='"+(a+1)+"']").addClass("an1");
					$("[code='"+(a+1)+"']").siblings().removeClass("an1");
					$(".div_tiao").animate({"left":(a*-1579)+"px"},1000);
				},3000);
				
				for (var b = 0;b<$(".div_tiao>img").length-1;b++) {
					$(".an").append("<div code='"+(b+1)+"'></div>")
				}
				$(".an>div:nth-child(1)").addClass("an1");
				
				$(".an>div").click(function(){
					a = parseInt($(this).attr("code"))-1;
					$(".div_tiao").animate({"left":(a*-1579)+"px"},1000);
					$(this).addClass("an1");
					$(this).siblings().removeClass("an1");
				});
				$(".div_body").mouseenter(function(){//鼠标移入了
					clearInterval(setIntCode);
				});
				$(".div_body").mouseleave(function(){//先鼠标移入才可以鼠标移出
					setIntCode = setInterval(function(){
						a++;
						if(a>3)
						{
							
							$(".div_tiao").animate({"left":0+"px"},0);
							a=1;
						}
						
						$(".div_tiao").animate({"left":(a*-1579)+"px"},1000);
					},3000);
				});
			});